home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / oji / nsIJVMManager.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  9KB  |  204 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIJVMManager.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIJVMManager_h__
  6. #define __gen_nsIJVMManager_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. #ifndef JNI_H
  18. #include "jni.h"
  19. #endif
  20. /*
  21.  Java VM Plugin Manager
  22.  This interface defines additional entry points that are available
  23.  to JVM plugins for browsers that support JVM plugins.
  24. */
  25. /*
  26. #define NS_IJVMMANAGER_IID                           \
  27. { / * a1e5ed50-aa4a-11d1-85b2-00805f0e4dfe * /       \
  28.     0xa1e5ed50,                                      \
  29.     0xaa4a,                                          \
  30.     0x11d1,                                          \
  31.     {0x85, 0xb2, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
  32. }
  33. */
  34. #define NS_JVMMANAGER_CID                            \
  35. { /* 38e7ef10-58df-11d2-8164-006008119d7a */         \
  36.     0x38e7ef10,                                      \
  37.     0x58df,                                          \
  38.     0x11d2,                                          \
  39.     {0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
  40. }
  41. class nsIJVMPlugin; /* forward declaration */
  42.  
  43. class nsISecureEnv; /* forward declaration */
  44.  
  45. class nsIPrincipal; /* forward declaration */
  46.  
  47.  
  48. /* starting interface:    nsIJVMManager */
  49. #define NS_IJVMMANAGER_IID_STR "a1e5ed50-aa4a-11d1-85b2-00805f0e4dfe"
  50.  
  51. #define NS_IJVMMANAGER_IID \
  52.   {0xa1e5ed50, 0xaa4a, 0x11d1, \
  53.     { 0x85, 0xb2, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe }}
  54.  
  55. class nsIJVMManager : public nsISupports {
  56.  public: 
  57.  
  58.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJVMMANAGER_IID)
  59.  
  60.       //    NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJVMMANAGER_IID)
  61.     NS_DEFINE_STATIC_CID_ACCESSOR(NS_JVMMANAGER_CID)
  62.   /**
  63.      * Creates a proxy JNI with an optional secure environment (which can be NULL).
  64.      * There is a one-to-one correspondence between proxy JNIs and threads, so
  65.      * calling this method multiple times from the same thread will return
  66.      * the same proxy JNI.
  67.      */
  68.   /* [noscript] void createProxyJNI (in nsISecureEnv secureEnv, out JNIEnv outProxyEnv); */
  69.   NS_IMETHOD CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv) = 0;
  70.  
  71.   /**
  72.      * Returns the proxy JNI associated with the current thread, or NULL if no
  73.      * such association exists.
  74.      */
  75.   /* [noscript] void getProxyJNI (out JNIEnv outProxyEnv); */
  76.   NS_IMETHOD GetProxyJNI(JNIEnv * *outProxyEnv) = 0;
  77.  
  78.   /**
  79.      * Called from Java Console menu item.
  80.      */
  81.   /* void showJavaConsole (); */
  82.   NS_IMETHOD ShowJavaConsole(void) = 0;
  83.  
  84.   /**
  85.      * isAllPermissionGranted [Deprecated Sep-10-2000]
  86.      */
  87.   /* boolean isAllPermissionGranted (in string lastFingerprint, in string lastCommonName, in string rootFingerprint, in string rootCommonName); */
  88.   NS_IMETHOD IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval) = 0;
  89.  
  90.   /**
  91.      * isAppletTrusted
  92.      */
  93.   /* nsIPrincipal isAppletTrusted (in string aRSABuf, in PRUint32 aRSABufLen, in string aPlaintext, in PRUint32 aPlaintextLen, out boolean isTrusted); */
  94.   NS_IMETHOD IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval) = 0;
  95.  
  96.   /**
  97.      * The JavaEnabled variable to see if Java is Enabled or not
  98.      */
  99.   /* readonly attribute boolean JavaEnabled; */
  100.   NS_IMETHOD GetJavaEnabled(PRBool *aJavaEnabled) = 0;
  101.  
  102. };
  103.  
  104. /* Use this macro when declaring classes that implement this interface. */
  105. #define NS_DECL_NSIJVMMANAGER \
  106.   NS_IMETHOD CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv); \
  107.   NS_IMETHOD GetProxyJNI(JNIEnv * *outProxyEnv); \
  108.   NS_IMETHOD ShowJavaConsole(void); \
  109.   NS_IMETHOD IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval); \
  110.   NS_IMETHOD IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval); \
  111.   NS_IMETHOD GetJavaEnabled(PRBool *aJavaEnabled); 
  112.  
  113. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  114. #define NS_FORWARD_NSIJVMMANAGER(_to) \
  115.   NS_IMETHOD CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv) { return _to CreateProxyJNI(secureEnv, outProxyEnv); } \
  116.   NS_IMETHOD GetProxyJNI(JNIEnv * *outProxyEnv) { return _to GetProxyJNI(outProxyEnv); } \
  117.   NS_IMETHOD ShowJavaConsole(void) { return _to ShowJavaConsole(); } \
  118.   NS_IMETHOD IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval) { return _to IsAllPermissionGranted(lastFingerprint, lastCommonName, rootFingerprint, rootCommonName, _retval); } \
  119.   NS_IMETHOD IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval) { return _to IsAppletTrusted(aRSABuf, aRSABufLen, aPlaintext, aPlaintextLen, isTrusted, _retval); } \
  120.   NS_IMETHOD GetJavaEnabled(PRBool *aJavaEnabled) { return _to GetJavaEnabled(aJavaEnabled); } 
  121.  
  122. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  123. #define NS_FORWARD_SAFE_NSIJVMMANAGER(_to) \
  124.   NS_IMETHOD CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateProxyJNI(secureEnv, outProxyEnv); } \
  125.   NS_IMETHOD GetProxyJNI(JNIEnv * *outProxyEnv) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxyJNI(outProxyEnv); } \
  126.   NS_IMETHOD ShowJavaConsole(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowJavaConsole(); } \
  127.   NS_IMETHOD IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsAllPermissionGranted(lastFingerprint, lastCommonName, rootFingerprint, rootCommonName, _retval); } \
  128.   NS_IMETHOD IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsAppletTrusted(aRSABuf, aRSABufLen, aPlaintext, aPlaintextLen, isTrusted, _retval); } \
  129.   NS_IMETHOD GetJavaEnabled(PRBool *aJavaEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJavaEnabled(aJavaEnabled); } 
  130.  
  131. #if 0
  132. /* Use the code below as a template for the implementation class for this interface. */
  133.  
  134. /* Header file */
  135. class nsJVMManager : public nsIJVMManager
  136. {
  137. public:
  138.   NS_DECL_ISUPPORTS
  139.   NS_DECL_NSIJVMMANAGER
  140.  
  141.   nsJVMManager();
  142.  
  143. private:
  144.   ~nsJVMManager();
  145.  
  146. protected:
  147.   /* additional members */
  148. };
  149.  
  150. /* Implementation file */
  151. NS_IMPL_ISUPPORTS1(nsJVMManager, nsIJVMManager)
  152.  
  153. nsJVMManager::nsJVMManager()
  154. {
  155.   /* member initializers and constructor code */
  156. }
  157.  
  158. nsJVMManager::~nsJVMManager()
  159. {
  160.   /* destructor code */
  161. }
  162.  
  163. /* [noscript] void createProxyJNI (in nsISecureEnv secureEnv, out JNIEnv outProxyEnv); */
  164. NS_IMETHODIMP nsJVMManager::CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv)
  165. {
  166.     return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168.  
  169. /* [noscript] void getProxyJNI (out JNIEnv outProxyEnv); */
  170. NS_IMETHODIMP nsJVMManager::GetProxyJNI(JNIEnv * *outProxyEnv)
  171. {
  172.     return NS_ERROR_NOT_IMPLEMENTED;
  173. }
  174.  
  175. /* void showJavaConsole (); */
  176. NS_IMETHODIMP nsJVMManager::ShowJavaConsole()
  177. {
  178.     return NS_ERROR_NOT_IMPLEMENTED;
  179. }
  180.  
  181. /* boolean isAllPermissionGranted (in string lastFingerprint, in string lastCommonName, in string rootFingerprint, in string rootCommonName); */
  182. NS_IMETHODIMP nsJVMManager::IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval)
  183. {
  184.     return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186.  
  187. /* nsIPrincipal isAppletTrusted (in string aRSABuf, in PRUint32 aRSABufLen, in string aPlaintext, in PRUint32 aPlaintextLen, out boolean isTrusted); */
  188. NS_IMETHODIMP nsJVMManager::IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval)
  189. {
  190.     return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192.  
  193. /* readonly attribute boolean JavaEnabled; */
  194. NS_IMETHODIMP nsJVMManager::GetJavaEnabled(PRBool *aJavaEnabled)
  195. {
  196.     return NS_ERROR_NOT_IMPLEMENTED;
  197. }
  198.  
  199. /* End of implementation class template. */
  200. #endif
  201.  
  202.  
  203. #endif /* __gen_nsIJVMManager_h__ */
  204.